import java.util.Scanner;

/**
 * Created with IntelliJ IDEA.
 * Description:
 * User: 邓大帅
 * Date: 2022-11-10
 * Time: 17:25
 */
public class CountBinaryOne {
    public static void main(String[] args) {
        Scanner input = new Scanner(System.in);
        int j = input.nextInt();
        int count = 0;
        for (int i = 0; i < 32; i++) {
            if ((j >> i & 1) == 1) {
                count++;
            }
        }
        System.out.println(count);
    }
}
